package com.example.administrator.jingpingou.bean;

import android.app.Service;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/8/29 0029.
 */
public class TeJiaBean {

    /**
     * list : [{"num_iid":"531271737256","title":"纯棉上衣+裤子运动套装","pic_url":"//img.alicdn.com/imgextra/i2/133640261837088525/TB11XYiLXXXXXcnXFXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"198.00","now_price":"54.50","is_hot":"0","is_cheap":"0","deal_num":"85","stock":"999999","discount":"2.8"},{"num_iid":"536023443407","title":"大码针织衫女开衫胖mm春秋","pic_url":"//img.alicdn.com/imgextra/i2/139810262247986385/TB1ng_qLXXXXXbMXVXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"199.00","now_price":"65.00","is_hot":"0","is_cheap":"1","deal_num":"64","stock":"999999","discount":"3.3"},{"num_iid":"533588611857","title":"超低价薄款牛仔连衣裙","pic_url":"//img.alicdn.com/imgextra/i4/180410262677229221/TB1AlHuLXXXXXaTapXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"69.00","now_price":"48.80","is_hot":"1","is_cheap":"0","deal_num":"22","stock":"999999","discount":"7.1"},{"num_iid":"43955285279","title":"秋款女装大码修身气质","pic_url":"//img.alicdn.com/imgextra/i3/130570263540653399/TB1IdUqLXXXXXbZXpXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"240.00","now_price":"48.00","is_hot":"0","is_cheap":"1","deal_num":"39","stock":"999999","discount":"2"},{"num_iid":"14121593599","title":"宽松大码打底连衣裙","pic_url":"//img.alicdn.com/imgextra/i2/114990262676750404/TB1c8n4LXXXXXXNXXXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"49.00","now_price":"39.00","is_hot":"1","is_cheap":"0","deal_num":"12","stock":"999999","discount":"8"},{"num_iid":"536128441351","title":"短袖短裙两件套时尚套装","pic_url":"//img.alicdn.com/imgextra/i4/164260263644646137/TB1g0EELXXXXXXzXXXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"158.00","now_price":"59.00","is_hot":"0","is_cheap":"1","deal_num":"764","stock":"999999","discount":"3.7"},{"num_iid":"536111667538","title":"亏本促销 弹力连衣裙","pic_url":"//img.alicdn.com/imgextra/i4/181820261972871805/TB1JM6fLXXXXXaEXVXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"79.00","now_price":"19.00","is_hot":"1","is_cheap":"0","deal_num":"69","stock":"999999","discount":"2.4"},{"num_iid":"535991674366","title":"免费试穿，加绒卫衣女","pic_url":"//img.alicdn.com/imgextra/i4/195510262278056803/TB12mfDLXXXXXcnXpXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"89.00","now_price":"19.80","is_hot":"1","is_cheap":"0","deal_num":"208","stock":"999999","discount":"2.2"},{"num_iid":"535455842615","title":"新款短款羽绒棉服女","pic_url":"//img.alicdn.com/imgextra/i2/155150261846528959/TB1Ia56LXXXXXa4apXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"298.00","now_price":"49.00","is_hot":"1","is_cheap":"0","deal_num":"37","stock":"999999","discount":"1.6"},{"num_iid":"523886760606","title":"毛呢外套女中长款韩版学生","pic_url":"//img.alicdn.com/imgextra/i1/145440262163676516/TB1dQrhLXXXXXb8aXXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"398.00","now_price":"125.00","is_hot":"0","is_cheap":"0","deal_num":"248","stock":"999999","discount":"3.1"},{"num_iid":"534431510229","title":"送运费险 上衣+短裤套装","pic_url":"//img.alicdn.com/imgextra/i4/165900262295358833/TB12gTeLXXXXXcuapXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"65.00","now_price":"42.00","is_hot":"0","is_cheap":"1","deal_num":"21","stock":"999999","discount":"6.5"},{"num_iid":"527152615132","title":"老年人春秋休闲长裤","pic_url":"//img.alicdn.com/imgextra/i2/188830263492066105/TB1JcUqLXXXXXbwXpXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"100.00","now_price":"19.00","is_hot":"1","is_cheap":"0","deal_num":"71","stock":"999999","discount":"1.9"},{"num_iid":"535630228908","title":"胖MM大码女装连衣裙","pic_url":"//img.alicdn.com/imgextra/i4/179560262742917040/TB1T12ELXXXXXbtaXXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"98.00","now_price":"49.00","is_hot":"1","is_cheap":"0","deal_num":"65","stock":"999999","discount":"5"},{"num_iid":"536305162775","title":"大码女装夏装牛仔连衣裙","pic_url":"//img.alicdn.com/imgextra/i2/119290262946886830/TB1xK_6LXXXXXclXpXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"258.00","now_price":"128.00","is_hot":"0","is_cheap":"1","deal_num":"24","stock":"999999","discount":"5"},{"num_iid":"529533694754","title":"性感百搭V领修身显瘦吊带","pic_url":"//img.alicdn.com/imgextra/i4/180070262316482354/TB1g6PFLXXXXXc0XpXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"88.00","now_price":"22.00","is_hot":"1","is_cheap":"0","deal_num":"220","stock":"999999","discount":"2.5"},{"num_iid":"530523765265","title":"金丝绒运动套装批发价跑量","pic_url":"//img.alicdn.com/imgextra/i4/170410261833336897/TB1eqnaLXXXXXapaXXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"125.00","now_price":"54.50","is_hot":"0","is_cheap":"1","deal_num":"33","stock":"999999","discount":"4.4"},{"num_iid":"535800145040","title":"小直筒牛仔裤女弹力长裤子","pic_url":"//img.alicdn.com/imgextra/i1/156240262072422241/TB1YGnuLXXXXXasXFXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"198.00","now_price":"59.00","is_hot":"1","is_cheap":"0","deal_num":"182","stock":"999999","discount":"3"},{"num_iid":"536594281545","title":"夏天小清新短袖T恤女装","pic_url":"//img.alicdn.com/imgextra/i4/198740263404720046/TB1iecwLXXXXXXSXXXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"129.00","now_price":"25.90","is_hot":"1","is_cheap":"1","deal_num":"13","stock":"999999","discount":"2"},{"num_iid":"533273821544","title":"新款时尚A字裙显瘦连衣裙","pic_url":"//img.alicdn.com/imgextra/i4/140040263708023755/TB1udofLXXXXXX2aXXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"188.00","now_price":"67.50","is_hot":"0","is_cheap":"0","deal_num":"37","stock":"999999","discount":"3.6"},{"num_iid":"529007600617","title":"休闲裤女工装裤长裤迷彩裤","pic_url":"//img.alicdn.com/imgextra/i2/121470261964195482/TB1WMLjLXXXXXa5XVXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"158.00","now_price":"69.00","is_hot":"1","is_cheap":"1","deal_num":"55","stock":"999999","discount":"4.4"},{"num_iid":"529361485966","title":"棉麻连衣裙宽松假两件套","pic_url":"//img.alicdn.com/imgextra/i1/156910261837717158/TB1e9PmLXXXXXXFXFXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"188.00","now_price":"79.00","is_hot":"0","is_cheap":"1","deal_num":"27","stock":"999999","discount":"4.2"},{"num_iid":"534859282211","title":"两件套镂空上衣+阔腿短裤","pic_url":"//img.alicdn.com/imgextra/i3/158720263475009883/TB1RH6.LXXXXXcGXVXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"188.00","now_price":"55.00","is_hot":"0","is_cheap":"0","deal_num":"75","stock":"999999","discount":"2.9"},{"num_iid":"531810742531","title":"大清仓条纹短袖女T恤","pic_url":"//img.alicdn.com/imgextra/i3/108040262921420470/TB1UoH6LXXXXXaMXpXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"100.00","now_price":"14.80","is_hot":"0","is_cheap":"1","deal_num":"417","stock":"999999","discount":"1.5"},{"num_iid":"532075301328","title":"清仓超低价优雅印花连衣裙","pic_url":"//img.alicdn.com/imgextra/i1/189200263115946629/TB16CkbLXXXXXbVXpXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg","origin_price":"256.00","now_price":"69.00","is_hot":"0","is_cheap":"0","deal_num":"50","stock":"999999","discount":"2.7"}]
     * is_end : 0
     */

    private int is_end;
    /**
     * num_iid : 531271737256
     * title : 纯棉上衣+裤子运动套装
     * pic_url : //img.alicdn.com/imgextra/i2/133640261837088525/TB11XYiLXXXXXcnXFXXXXXXXXXX_!!0-tejia.jpg_220x220.jpg
     * origin_price : 198.00
     * now_price : 54.50
     * is_hot : 0
     * is_cheap : 0
     * deal_num : 85
     * stock : 999999
     * discount : 2.8
     */

    private List<ListEntity> list;

    public static TeJiaBean objectFromData(String str) {

        return new com.google.gson.Gson().fromJson(str, TeJiaBean.class);
    }

    public static TeJiaBean objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new com.google.gson.Gson().fromJson(jsonObject.getString(str), TeJiaBean.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public static List<TeJiaBean> arrayTeJiaBeanFromData(String str) {

        Type listType = new com.google.gson.reflect.TypeToken<ArrayList<TeJiaBean>>() {
        }.getType();

        return new com.google.gson.Gson().fromJson(str, listType);
    }

    public static List<TeJiaBean> arrayTeJiaBeanFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);
            Type listType = new com.google.gson.reflect.TypeToken<ArrayList<TeJiaBean>>() {
            }.getType();

            return new com.google.gson.Gson().fromJson(jsonObject.getString(str), listType);

        } catch (JSONException e) {
            e.printStackTrace();
        }

        return new ArrayList();


    }

    public int getIs_end() {
        return is_end;
    }

    public void setIs_end(int is_end) {
        this.is_end = is_end;
    }

    public List<ListEntity> getList() {
        return list;
    }

    public void setList(List<ListEntity> list) {
        this.list = list;
    }

    public static class ListEntity implements Serializable{
        private String num_iid;
        private String title;
        private String pic_url;
        private String origin_price;
        private String now_price;
        private String is_hot;
        private String is_cheap;
        private String deal_num;
        private String stock;
        private String discount;

        public static ListEntity objectFromData(String str) {

            return new com.google.gson.Gson().fromJson(str, ListEntity.class);
        }

        public static ListEntity objectFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);

                return new com.google.gson.Gson().fromJson(jsonObject.getString(str), ListEntity.class);
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }

        public static List<ListEntity> arrayListEntityFromData(String str) {

            Type listType = new com.google.gson.reflect.TypeToken<ArrayList<ListEntity>>() {
            }.getType();

            return new com.google.gson.Gson().fromJson(str, listType);
        }

        public static List<ListEntity> arrayListEntityFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);
                Type listType = new com.google.gson.reflect.TypeToken<ArrayList<ListEntity>>() {
                }.getType();

                return new com.google.gson.Gson().fromJson(jsonObject.getString(str), listType);

            } catch (JSONException e) {
                e.printStackTrace();
            }

            return new ArrayList();


        }

        public String getNum_iid() {
            return num_iid;
        }

        public void setNum_iid(String num_iid) {
            this.num_iid = num_iid;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getPic_url() {
            return pic_url;
        }

        public void setPic_url(String pic_url) {
            this.pic_url = pic_url;
        }

        public String getOrigin_price() {
            return origin_price;
        }

        public void setOrigin_price(String origin_price) {
            this.origin_price = origin_price;
        }

        public String getNow_price() {
            return now_price;
        }

        public void setNow_price(String now_price) {
            this.now_price = now_price;
        }

        public String getIs_hot() {
            return is_hot;
        }

        public void setIs_hot(String is_hot) {
            this.is_hot = is_hot;
        }

        public String getIs_cheap() {
            return is_cheap;
        }

        public void setIs_cheap(String is_cheap) {
            this.is_cheap = is_cheap;
        }

        public String getDeal_num() {
            return deal_num;
        }

        public void setDeal_num(String deal_num) {
            this.deal_num = deal_num;
        }

        public String getStock() {
            return stock;
        }

        public void setStock(String stock) {
            this.stock = stock;
        }

        public String getDiscount() {
            return discount;
        }

        public void setDiscount(String discount) {
            this.discount = discount;
        }
    }
}
